import 'package:boss/ui/page/takeoutManagement/page/takeoutDetail/provider/takeout_detail_provider.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'takeout_base_panel.dart';
import 'takeout_commodity_panel.dart';
import 'takeout_order_panel.dart';

class TakeoutDetailBrowser extends StatefulWidget {
  @override
  _TakeoutDetailBrowserState createState() => _TakeoutDetailBrowserState();
}

class _TakeoutDetailBrowserState extends State<TakeoutDetailBrowser> {
  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
      padding: EdgeInsets.symmetric(
        horizontal: 20.w,
        vertical: 30.w,
      ),
      child: Consumer<TakeoutDetailProvider>(
        builder: (context, provider, _) {
          return Column(
            children: <Widget>[
              TakeoutBasePanel(data: provider.data),
              TakeoutCommodityPanel(data: provider.data),
              TakeoutOrderPanel(
                data: provider.data,
              ),
            ],
          );
        },
      ),
    );
  }
}
